package club.zhilin.guli.service.edu.feign;

import club.zhilin.guli.common.base.result.CommonResult;
import club.zhilin.guli.service.edu.feign.fallback.OssFileServiceFallBackImpl;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author zhilin
 * @since 2022/1/20 23:00
 */
@FeignClient(value = "service-oss")
@SentinelResource(fallbackClass = OssFileServiceFallBackImpl.class)
public interface OssFileService {

    /**
     * 删除文件
     *
     * @param url 文件在oss服务器中的url地址
     * @return commonResult
     */
    @DeleteMapping("/admin/oss/file/deleteFile")
    CommonResult<String> deleteFile(@RequestBody String url);
}
